package com.heima.article.controller.v1;

import com.heima.article.service.ApArticleInfoService;
import com.heima.model.article.dtos.ArticleInfoDto;
import com.heima.model.article.vos.ArticleInfoVo;
import com.heima.model.common.dtos.ResponseResult;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/api/v1/article/load_article_behavior")
public class ApArticleInfoController {

    private final ApArticleInfoService apArticleInfoService;

    @PostMapping
    public ResponseResult loadArticleInfo(@RequestBody ArticleInfoDto articleInfoDto) {
        ArticleInfoVo articleInfoVo = apArticleInfoService.loadArticleInfo(articleInfoDto);
        return ResponseResult.okResult(articleInfoVo);
    }

}
